<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="Ytool.js"></script>
</head>
<body>
  
    <button id="b1">1</button>
  <button id="b2">2</button>
 <!--  <img src="upload/1.jpg" alt=""> --> 
    <input type="text" value="ahahah">
      <script>
        
        //   var b = document.querySelector('button')
        //   var c = document.querySelector('.c')
        //   b.onclick = function(){
        //       c.innerHTML = getNowDate();
        //   }
         var b1 = document.getElementById('b1')
         var b2 = document.getElementById('b2')
         var inp = document.querySelector('input')
         var flag = 0;
         b1.onclick = function(){
             if(flag==0){
                inp.type= 'text'
                flag = 1
             }else{

                 inp.type= 'password'
                 flag = 0
             }
            
         }
         b2.onclick = function(){
             inp.value = '傻逼'
         }
      </script>
    
</body>
</html>